"""
简化的数据模型

专门用于Excel输入输出的简化数据结构
"""

from dataclasses import dataclass
from typing import Dict, List, Any, Optional
from datetime import date


@dataclass
class ProjectInfo:
    """项目基本信息"""
    project_id: str
    project_name: str
    start_date: date
    end_date: date
    budget: float
    description: str = ""


@dataclass
class ProjectRole:
    """项目角色信息"""
    project_id: str
    role: str
    unit_price: float
    total_cost: float = 0


@dataclass
class PhaseDetail:
    """阶段详情信息"""
    project_id: str
    phase_name: str
    start_date: date
    end_date: date
    role: str
    unit_price: float
    person_months: float


@dataclass
class MonthlyAllocation:
    """月度分配结果"""
    project_id: str
    phase_name: str
    month: date
    role: str
    person_count: int
    unit_price: float
    cost: float


@dataclass
class ValidationResult:
    """验证结果"""
    is_valid: bool
    errors: List[str]
    warnings: List[str]


@dataclass
class RevisionHistoryEntry:
    """改定履历条目"""
    version: str
    date: str
    creator: str
    approver: str = ""
    change_reason: str = ""
    content: str = ""